<?php
abstract class GoesActiveRecord extends CActiveRecord
{
  /**
  * Prepares create_time, create_user_id, update_time and update_user_
id attributes before performing validation.
  */
  protected function beforeValidate()
  {
      if($this->isNewRecord)
    {
      // set the create date, last updated date and the user doing the creating  
      $this->CREATE_TIME=$this->UPDATE_TIME=new CDbExpression('NOW()');
    }
    else
    {
      //not a new record, so just set the last updated time and last updated user id     
      $this->UPDATE_TIME=new CDbExpression('NOW()');
	  //$this->JENIS_TRAVEL = 'Mobil';
    }
    
    return parent::beforeValidate();
    }
}